import { createApp } from 'vue'
import App from './03_自定义指令/App.vue'

import regDirectives from './directives'

import plugins_object from './plugins/plugins_object';
import plugins_function from './plugins/plugins_function';

import regDirective from './plugins/formatTimes'

const app = createApp(App);

//传入app
regDirectives(app)

//使用use插件  它会自动调用plugins_object里的自带函数install() 并传入app
app.use(plugins_object)
//使用use插件  这个函数会在use时自动执行
app.use(plugins_function)

app.use(regDirective)

//全局自定义指令
app.directive("focus", {
    mounted(el) {
        el.focus()
    },
})

app.mount('#app')
